<?php

if (!defined('IN_ANWSION'))
{
	die;
}

class main extends AWS_CONTROLLER
{
	public function index_action()
	{
		if($this->user_info['verified'] != 'personal')
		{
			H::redirect_msg('对不起，您不是工作室认证成员，请联系组长或者管理员认证您的工作室成员信息', 
			'/account/setting/verify/');
		}
		$domain = "http://192.168.124.35/qiandao/";
		$uid = $this->user_id;
		$token = $this->token($uid);
		$uri = $domain.'?token='.$token;
		header("Location: " . $uri);
	}

	private function token($uid){
		$date =  date("YmdH");
		$raw = md5($date.$uid);

		return base64_encode($raw."\n".$uid);
	}
}